import { createRouter, createWebHistory } from "vue-router";
import Home from '@/views/Home.vue'
import News from '@/views/News.vue'
import About from '@/views/About.vue'
import Detail from "@/views/Detail.vue";

const router = createRouter({
    history: createWebHistory(),
    routes: [
        { 
            path: '/home', 
            component: Home 

        },
        {
            path: '/news', component: News, children: [
                {
                    path: 'detail',
                    component: Detail
                }
            ]
        },
        { 
            path: '/about', 
            component: About 
        }
    ]
})

export default router